﻿using DevExpress.DataAccess.Native.Json;
using DevExpress.XtraGrid.Demos.util;
using DXApplicationTangche.DTO;
using DXApplicationTangche.UC.生产计划.编排生产批.service;
using Kingdee.BOS.WebApi.Client;
using mendian;
using System;
using System.Collections.Generic;
using Newtonsoft.Json.Linq;
using System.Linq;
using System.Text;
using System.Drawing;
using System.Threading.Tasks;
using static DXApplicationTangche.UC.金蝶.dto.MaterialResultDTO;
using static DXApplicationTangche.UC.金蝶.dto.PurchaseOrderDTO;
using static DXApplicationTangche.UC.金蝶.dto.StockOutDTO;
using System.IO;
using DXApplicationTangche.service;
using DXApplicationTangche.UC.金蝶.dto;
using DXApplicationTangche.UC.抖音出入库.Service;
using DXApplicationTangche.UC.订单一览新.订单预览新.service;
using DXApplicationTangche.UC.成品出库单.service;
using System.Data;
using System.ComponentModel;
using DXApplicationTangche.UC.金蝶;

namespace DXApplicationTangche.UC.面料审核.Service
{
    public class 面料审核Service
    {

        ///bom/getFabricBOMConsumption
        //post
        public static List<WIPBatchWIthMBomDTO> getFabricBOMConsumption(List<String> shopIds)
        {
            String xx = FunctionHelper.JsonSerialization(shopIds);
            return
                FunctionHelper.JsonDeserialization<List<WIPBatchWIthMBomDTO>>(
                    RestCall.PostHttp(
                           URL.接口url + "/bom/getFabricBOMConsumption",
                           FunctionHelper.JsonSerialization(shopIds)
                           )
                );
        }

        /// <summary>
        /// 获取物料需求计划一览
        /// </summary>
        /// <returns></returns>
        public static List<MaterialPlanDTO> getMaterialPlanIndexAll()
        {
            return
                FunctionHelper.JsonDeserialization<List<MaterialPlanDTO>>(
                    RestCall.httpGetMethod(
                        URL.接口url + "/bom/getMaterialPlanIndexAll"
                    )
                );
        }
        public static List<MaterialPlanConfirmIndexDTO> getMaterialPlanConfirmIndexAll()
        {
            return
                FunctionHelper.JsonDeserialization<List<MaterialPlanConfirmIndexDTO>>(
                    RestCall.httpGetMethod(
                        URL.接口url + "/bom/getMaterialPlanConfirmIndexAll"
                    )
                );
        }
        public static List<MaterialPlanConfirmIndexDTO> getMaterialPlanConfirmIndexAllByShopId(String shopId)
        {
            return
                FunctionHelper.JsonDeserialization<List<MaterialPlanConfirmIndexDTO>>(
                    RestCall.httpGetMethod(
                        URL.接口url + "/bom/getMaterialPlanConfirmIndexAllByShopId?shopId=" + shopId
                    )
                );
        }
        /// <summary>
        /// 获取待审版一览
        /// </summary>
        /// <returns></returns>
        public static List<PreManufactureCADTodoDTO> getPreManufactureCADTodo()
        {
            return
                FunctionHelper.JsonDeserialization<List<PreManufactureCADTodoDTO>>(
                    RestCall.httpGetMethod(
                        URL.接口url + "/bom/getPreManufactureCADTodo"
                    )
                );
        }
        /// <summary>
        /// 根据物料编码获取金蝶物料数据
        /// </summary>
        /// <param name="fname"></param>
        /// <returns></returns>
        public static MaterialDetailDTO getMaterialDetail(String fname)
        {
            return
                FunctionHelper.JsonDeserialization<MaterialDetailDTO>(
                    RestCall.httpGetMethod(
                        URL.接口url + "/material/getMaterialDetail?fname=" + fname
                    )
                );
        }
        /// <summary>
        /// 根据生产批计算库存和固定损耗
        /// </summary>
        /// <param name="wipBatchWIthMBomDTOS"></param>
        /// <returns></returns>
        public static MaterialRequirementQueryFacadeDTO getMaterialRequirement(List<WIPBatchWIthMBomDTO> wipBatchWIthMBomDTOS)
        {
            String xx = FunctionHelper.JsonSerialization(wipBatchWIthMBomDTOS);
            return
                FunctionHelper.JsonDeserialization<MaterialRequirementQueryFacadeDTO>(
                       RestCall.PostHttp(
                           URL.接口url + "/bom/getMaterialRequirement",
                           FunctionHelper.JsonSerialization(wipBatchWIthMBomDTOS)
                           )
                       );
        }
        /// <summary>
        /// 生成物料需求计划
        /// </summary>
        /// <param name="mnemonic"></param>
        /// <param name="defectCodes"></param>
        public static void generateMaterialRequirementPlan(String mnemonic, MaterialRequirementQueryFacadeDTO materialRequirementQueryFacadeDTO)
        {
            RestCall.PostHttp(
                URL.接口url + "/bom/generateMaterialRequirementPlan?mnemonic=" + mnemonic,
                FunctionHelper.JsonSerialization(materialRequirementQueryFacadeDTO)
                );
        }
        
        /// <summary>
        /// 保存抖音订单
        /// </summary>
        /// <param name="orgId"></param>
        /// <param name="shopId"></param>
        /// <param name="filePath"></param>
        public static String saveDouyinOrder(String orgId, String shopId, String filePath)
        {
            return
                FileService.UploadRequest(
                    URL.接口url1 + "/douyin/saveDouyinOrder?orgId=" + orgId + "&shopId=" + shopId,
                    filePath,
                    Path.GetFileName(filePath),
                    "multipartFile"
            );
        }
        /// <summary>
        /// 裁剪完成
        /// </summary>
        /// <param name="mnemonic"></param>
        /// <param name="materialRequirementQueryFacadeDTO"></param>
        public static void tailorFinish(String mnemonic, MaterialPlanConfirmIndexDTO materialPlanConfirmIndex)
        {
            String xx = FunctionHelper.JsonSerialization(materialPlanConfirmIndex);
            RestCall.PostHttp(
                URL.接口url + "/bom/tailorFinish?mnemonic=" + mnemonic,
                FunctionHelper.JsonSerialization(materialPlanConfirmIndex)
                );
        }
        /// <summary>
        /// 根据id找物料需求计划
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public static MaterialRequirementQueryDTO getMaterialRequirementQueryById(String id)
        {
            return
                FunctionHelper.JsonDeserialization<MaterialRequirementQueryDTO>(
                    RestCall.httpGetMethod(
                        URL.接口url + "/bom/getMaterialRequirementQueryById?id=" + id
                    )
                );
        }
        /// <summary>
        /// 根据id生成成衣出库计划
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public static List<DouyinRequestDTO> getGarmentStockOutPlanById(String id)
        {
            return
                FunctionHelper.JsonDeserialization<List<DouyinRequestDTO>>(
                    RestCall.httpGetMethod(
                        URL.接口url + "/bom/getGarmentStockOutPlanById?id=" + id
                    )
                );
        }
        public static String saveDouyinRequest(String id, List<DouyinRequestDTO> douyinRequestDTO)
        {
            String xx = FunctionHelper.JsonSerialization(douyinRequestDTO);
            return
                FunctionHelper.JsonDeserialization<String>(
                       RestCall.PostHttp(
                           URL.接口url + "/bom/saveDouyinRequest?id=" + id,
                           FunctionHelper.JsonSerialization(douyinRequestDTO)
                           )
                       );
        }
        /// <summary>
        /// 判断成衣码是否存在
        /// </summary>
        /// <param name="douyinRequestDTO">根据生产计划id查找</param>
        /// <param name="barcode">成衣码</param>
        /// <returns></returns>
        public static Boolean 判断成衣码是否存在(DouyinRequestDTO douyinRequestDTO, String barcode)
        {
            //循环detail
            //barcode数量大于1时判断是否重复
            if (douyinRequestDTO.douyinStockOutDetailDTOs.Count > 0)
            {
                foreach (DouyinStockOutDetailDTO douyinStockOutDetailDTO in douyinRequestDTO.douyinStockOutDetailDTOs)
                {
                    if (barcode.Equals(douyinStockOutDetailDTO.barcode))
                    {
                        return true;
                    }
                }
            }
            return false;
        }
        /// <summary>
        /// 判断款式是否符合
        /// </summary>
        /// <param name="douyinRequestDTOs抖音扫码">扫码明细</param>
        /// <param name="orderCommitDTO返回">成衣码查看orderCommit</param>
        /// <param name="barcode">成衣码</param>
        /// <returns></returns>
        public static BlnResult 判断款式是否符合(List<DouyinRequestDTO> douyinRequestDTOs抖音扫码, OrderCommitDTO返回 orderCommitDTO返回, String barcode)
        {
            foreach (DouyinRequestDTO douyinRequestDTO in douyinRequestDTOs抖音扫码)
            {
                //款式匹配
                if (douyinRequestDTO.styleNameCn.Equals(orderCommitDTO返回.styleNameCn)
                    && douyinRequestDTO.materialCode.Equals(orderCommitDTO返回.materialCode))
                {
                    //款式正确后判断成衣码是否重复，不重复添加
                    bool if条码存在 = 面料审核Service.判断成衣码是否存在(douyinRequestDTO, barcode);  //  条码是否重复

                    //  匹配上款式和面料的后续逻辑
                    //已完成数量自增
                    if (!if条码存在)
                    {
                        douyinRequestDTO.douyinStockOutDetailDTOs.Add(new DouyinStockOutDetailDTO(barcode, orderCommitDTO返回.styleNameCn, orderCommitDTO返回.materialCode, orderCommitDTO返回.styleSizeCd));
                    }
                    //符合款式 为true
                    return new BlnResult(
                            true,
                             if条码存在
                        );
                }
            }
            return new BlnResult();
        }
        /// <summary>
        /// 修改裁剪出库实际数
        /// </summary>
        /// <param name="styleName"></param>
        /// <param name="materialNo"></param>
        /// <param name="fnumber"></param>
        /// <returns></returns>
        public static String modifyTailorStockOut(String materialRequirementId, String fname, String fabricScrapQty)
        {
            return
                    RestCall.httpGetMethod(
                        URL.接口url + "/bom/modifyTailorStockOut?materialRequirementId=" + materialRequirementId
                        + "&fname=" + fname
                        + "&fabricScrapQty=" + fabricScrapQty
                    );
        }
        /// <summary>
        /// 修改出库单实际数
        /// </summary>
        /// <param name="materialRequirementId"></param>
        /// <param name="fname"></param>
        /// <param name="fabricScrapQty"></param>
        /// <returns></returns>
        public static String modifyMaterialDeliveryEntry(String id, String fmaterialid, String fabricScrapQty)
        {
            return
                    RestCall.httpGetMethod(
                        URL.接口url + "/bom/modifyMaterialDeliveryEntry?id=" + id
                        + "&fmaterialid=" + fmaterialid
                        + "&fabricScrapQty=" + fabricScrapQty
                    );
        }
        /// <summary>
        /// 补充采购订单抬头
        /// </summary>
        /// <param name="mnemonic"></param>
        /// <param name="materialRequirementQueryFacadeDTO"></param>
        public static void generateMaterialPurchase(
            String materialRequirementId,
            String id,
            String fnumber,
            String supplierid,
            String supplierName,
            List<MaterialPurchaseDetailDTO> materialPurchaseDetailDTO)
        {
            RestCall.PostHttp(
                URL.接口url + "/bom/generateMaterialPurchase?materialRequirementId=" + materialRequirementId
                    + "&id=" + id
                    + "&fnumber=" + fnumber
                    + "&supplierid=" + supplierid
                    + "&supplierName=" + supplierName,
                FunctionHelper.JsonSerialization(materialPurchaseDetailDTO)
                );
        }

        public static KindDeeApplyReturnDTO 保存采购订单(String fsupplyNumber, List<MaterialPurchaseDetailDTO> materialPurchaseDetailDTOs)
        {
            //// 使用webapi引用组件Kingdee.BOS.WebApi.Client.dll
            //K3CloudApiClient client = new K3CloudApiClient("http://192.168.3.251/k3cloud/");
            //var loginResult = client.ValidateLogin("6128407938e2f2", "Administrator", "Sshirt@1234", 2052);
            //var resultType = Newtonsoft.Json.Linq.JObject.Parse(loginResult)["LoginResultType"].Value<int>();

            ////登录结果类型等于1，代表登录成功
            //if (resultType == 1)
            //{
            //    String result = client.Save("PUR_PurchaseOrder", FunctionHelper.JsonSerialization(new PurchaseOrderRoot(fsupplyNumber, materialPurchaseDetailDTOs)));
            //    KingDeeAddResultRoot kingDeeAddResultRoot = FunctionHelper.JsonDeserialization<KingDeeAddResultRoot>(result);
            //    if (Convert.ToBoolean(kingDeeAddResultRoot.Result.ResponseStatus.IsSuccess))
            //    {
            //        //审核提交
            //        //String Submitresult = client.Submit("PUR_PurchaseOrder", FunctionHelper.JsonSerialization(new MaterialSubmitDTO(kingDeeAddResultRoot.Result.Number, kingDeeAddResultRoot.Result.Id.ToString())));
            //        //String Verifyresult = client.Audit("PUR_PurchaseOrder", FunctionHelper.JsonSerialization(new MaterialVerifyDTO(kingDeeAddResultRoot.Result.Number, kingDeeAddResultRoot.Result.Id.ToString())));
            //    }
            //    return kingDeeAddResultRoot.build();
            //}
            //else
            //{
            //    return new KindDeeApplyReturnDTO(false, "登录失败");
            //}
            return new KindDeeApplyReturnDTO(false, "登录失败");
        }
        public static KindDeeApplyReturnDTO 保存出库单(List<StockOutDetailDTO> stockOutDetailDTOs)
        {
            //// 使用webapi引用组件Kingdee.BOS.WebApi.Client.dll
            //K3CloudApiClient client = new K3CloudApiClient("http://192.168.3.251/k3cloud/");
            //var loginResult = client.ValidateLogin("6128407938e2f2", "Administrator", "Sshirt@1234", 2052);
            //var resultType = Newtonsoft.Json.Linq.JObject.Parse(loginResult)["LoginResultType"].Value<int>();

            ////登录结果类型等于1，代表登录成功
            //if (resultType == 1)
            //{
            //    String result = client.Save("STK_MisDelivery", FunctionHelper.JsonSerialization(new StockOutRoot(stockOutDetailDTOs)));
            //    KingDeeAddResultRoot kingDeeAddResultRoot = FunctionHelper.JsonDeserialization<KingDeeAddResultRoot>(result);
            //    if (Convert.ToBoolean(kingDeeAddResultRoot.Result.ResponseStatus.IsSuccess))
            //    {
            //        //审核提交
            //        //String Submitresult = client.Submit("STK_MisDelivery", FunctionHelper.JsonSerialization(new MaterialSubmitDTO(kingDeeAddResultRoot.Result.Number, kingDeeAddResultRoot.Result.Id.ToString())));
            //        //String Verifyresult = client.Audit("STK_MisDelivery", FunctionHelper.JsonSerialization(new MaterialVerifyDTO(kingDeeAddResultRoot.Result.Number, kingDeeAddResultRoot.Result.Id.ToString())));
            //    }
            //    return kingDeeAddResultRoot.build();
            //}
            ////登录失败
            //else
            //{
            //    return new KindDeeApplyReturnDTO(false, "登录失败");
            //}
            return new KindDeeApplyReturnDTO(false, "登录失败");
        }
        public static KindDeeApplyReturnDTO 保存辅料出库单(List<StockOutDetailDTO> stockOutDetailDTOs)
        {
            //// 使用webapi引用组件Kingdee.BOS.WebApi.Client.dll
            //K3CloudApiClient client = new K3CloudApiClient("http://192.168.3.251/k3cloud/");
            //var loginResult = client.ValidateLogin("6128407938e2f2", "Administrator", "Sshirt@1234", 2052);
            //var resultType = Newtonsoft.Json.Linq.JObject.Parse(loginResult)["LoginResultType"].Value<int>();

            ////登录结果类型等于1，代表登录成功
            //if (resultType == 1)
            //{
            //    String result = client.Save("STK_MisDelivery", FunctionHelper.JsonSerialization(new StockOutRoot(stockOutDetailDTOs)));
            //    KingDeeAddResultRoot kingDeeAddResultRoot = FunctionHelper.JsonDeserialization<KingDeeAddResultRoot>(result);
            //    if (Convert.ToBoolean(kingDeeAddResultRoot.Result.ResponseStatus.IsSuccess))
            //    {
            //        //审核提交
            //        //String Submitresult = client.Submit("STK_MisDelivery", FunctionHelper.JsonSerialization(new MaterialSubmitDTO(kingDeeAddResultRoot.Result.Number, kingDeeAddResultRoot.Result.Id.ToString())));
            //        //String Verifyresult = client.Audit("STK_MisDelivery", FunctionHelper.JsonSerialization(new MaterialVerifyDTO(kingDeeAddResultRoot.Result.Number, kingDeeAddResultRoot.Result.Id.ToString())));
            //    }
            //    return kingDeeAddResultRoot.build();
            //}
            ////登录失败
            //else
            //{
            //    return new KindDeeApplyReturnDTO(false, "登录失败");
            //}
            return new KindDeeApplyReturnDTO(false, "登录失败");
        }
        public static void 出库单审核提交(String Fid, String Fnumber)
        {
            //// 使用webapi引用组件Kingdee.BOS.WebApi.Client.dll
            //K3CloudApiClient client = new K3CloudApiClient("http://192.168.3.251/k3cloud/");
            //var loginResult = client.ValidateLogin("6128407938e2f2", "Administrator", "Sshirt@1234", 2052);
            //var resultType = Newtonsoft.Json.Linq.JObject.Parse(loginResult)["LoginResultType"].Value<int>();

            ////登录结果类型等于1，代表登录成功
            //if (resultType == 1)
            //{
            //    String Submitresult = client.Submit("STK_MisDelivery", FunctionHelper.JsonSerialization(new MaterialSubmitDTO(Fnumber, Fid)));
            //    String SupplierVerifyresult = client.Audit("STK_MisDelivery", FunctionHelper.JsonSerialization(new MaterialVerifyDTO(Fnumber, Fid)));
            //}
        }

        /// <summary>
        /// 保存金蝶物料领用出库单信息
        /// </summary>
        /// <param name="mobile"></param>
        /// <param name="ofd"></param>
        /// <returns></returns>
        public static String generateMaterialStockOut(String materialRequirementId, String fid, String fName, String stockOutMnemonic, String filePath)
        {
            return
                FileService.UploadRequest(
                    URL.接口url + "/bom/generateMaterialStockOut?materialRequirementId=" + materialRequirementId
                        + "&fid=" + fid
                        + "&fName=" + fName
                        + "&stockOutMnemonic=" + stockOutMnemonic,
                    filePath,
                    Path.GetFileName(filePath),
                    "multipartFile"
                );
        }

        //PlainMessageResult
        public static void uploadFile(String fName, String filePath)
        {
            FileService.UploadRequest(
                URL.接口url + "/bom/uploadFile?fName=" + fName,
                filePath,
                Path.GetFileName(filePath),
                "multipartFile"
            );
        }
        /// <summary>
        /// 保存成分
        /// </summary>
        /// <param name="composition"></param>
        /// <param name="desc"></param>
        /// <returns></returns>
        public static String saveMaterialComposition(String composition, String desc)
        {
            return
                    RestCall.httpGetMethod(
                        URL.接口url + "/material/saveMaterialComposition?composition=" + composition
                        + "&desc=" + desc
                    );
        }
        public static List<MaterialCompositionDTO> getMaterialCompositionAll()
        {
            return
                     FunctionHelper.JsonDeserialization<List<MaterialCompositionDTO>>(
                         RestCall.httpGetMethod(
                             URL.接口url + "/material/getMaterialCompositionAll"
                         )
                     );
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="fnames"></param>
        /// <returns></returns>
        public static List<KingDeeStockInventoryDTO> getKingDeeStockInventoryByFnames(List<String> fnames)
        {
            String xx = FunctionHelper.JsonSerialization(fnames);
            return
                FunctionHelper.JsonDeserialization<List<KingDeeStockInventoryDTO>>(
                    RestCall.PostHttp(
                           URL.接口url + "/bom/getKingDeeStockInventoryByFnames",
                           FunctionHelper.JsonSerialization(fnames)
                           )
                );
        }
        /// <summary>
        /// 根据计划id获取坚山一览
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public static List<KashiyamaWipDTO> getKashiyamaWipByPlanId(String id)
        {
            return
                     FunctionHelper.JsonDeserialization<List<KashiyamaWipDTO>>(
                         RestCall.httpGetMethod(
                             URL.接口url + "/bom/getKashiyamaWipByPlanId?id=" + id
                         )
                     );

        }
        //MrpStockOutDetailDTO
        public static List<MrpStockOutDetailDTO> getMrpStockOutDetailDTO(String shopId,String start,String end)
        {
            return
                     FunctionHelper.JsonDeserialization<List<MrpStockOutDetailDTO>>(
                         RestCall.httpGetMethod(
                             URL.接口url1 + "/mrp_report/getMrpStockOutDetailDTO?shopId=" + shopId
                                                                            +"&start="+start
                                                                            + "&end=" + end
                         )
                     );

        }
        //MrpInventoryCalculateResultDTO
        public static MrpInventoryCalculateResultDTO getMrpInventoryCalculateResult(String shopId, String start, String end)
        {
            return
                     FunctionHelper.JsonDeserialization<MrpInventoryCalculateResultDTO>(
                         RestCall.httpGetMethod(
                             URL.接口url1 + "/mrp_report/getMrpInventoryCalculateResult?shopId=" + shopId
                                                                            + "&start=" + start
                                                                            + "&end=" + end
                         )
                     );

        }
        /// <summary>
        /// 根据计划单筛选产成品状态,带抖音出入库信息
        /// </summary>
        /// <param name="shopId"></param>
        /// <param name="start"></param>
        /// <param name="end"></param>
        /// <returns></returns>
        public static MrpInventoryCalculateResultDTO getMrpInventoryCalculateResultWithDouyinInfo(String shopId, String start, String end)
        {
            return
                     FunctionHelper.JsonDeserialization<MrpInventoryCalculateResultDTO>(
                         RestCall.httpGetMethod(
                             URL.接口url1 + "/mrp_report/getMrpInventoryCalculateResultWithDouyinInfo?shopId=" + shopId
                                                                            + "&start=" + start
                                                                            + "&end=" + end
                         )
                     );

        }
        //MaterialRequirementQueryDTO
        public static MaterialRequirementQueryDTO getMaterialRequirementInfoByBarcode(String barcode)
        {
            return
                     FunctionHelper.JsonDeserialization<MaterialRequirementQueryDTO>(
                         RestCall.httpGetMethod(
                             URL.接口url1 + "/mrp_report/getMaterialRequirementInfoByBarcode?barcode=" + barcode
                         )
                     );

        }
        public static List<MrpStockOutDetailDTO> getKingeeStockInventoryByFnames(List<String> materialRequirementIds)
        {
            String xx = FunctionHelper.JsonSerialization(materialRequirementIds);
            return
                FunctionHelper.JsonDeserialization<List<MrpStockOutDetailDTO>>(
                    RestCall.PostHttp(
                           URL.接口url1 + "/mrp_report/getMrpStockOutDetailByIds",
                           FunctionHelper.JsonSerialization(materialRequirementIds)
                           )
                );
        }
        //GarmentStockDTO
        public static List<GarmentStockDTO> getGarmentStocckByBarcode(String barcode)
        {
            return
                     FunctionHelper.JsonDeserialization<List<GarmentStockDTO>>(
                         RestCall.httpGetMethod(
                             URL.接口url + "/store/getGarmentStocckByBarcode?barcode=" + barcode
                         )
                     );

        }
        public static List<GarmentStockDTO> getStockInOutDetail(String shopId, String start, String end)
        {
            return
                     FunctionHelper.JsonDeserialization<List<GarmentStockDTO>>(
                         RestCall.httpGetMethod(
                             URL.接口url + "/store/getStockInOutDetail?shopId=" + shopId
                                                                            + "&start=" + start
                                                                            + "&end=" + end
                         )
                     );

        }
        /// <summary>
        /// 以十条为单位批量出入库
        /// </summary>
        /// <param name="inOutFlag"></param>
        /// <param name="inOutType"></param>
        /// <param name="shopId"></param>
        /// <param name="barcodes"></param>
        /// <returns></returns>
        public static List<StockInOutDetailDTO> saveBarcoderStockHandle(
            int inOutFlag,
            String inOutType,
            String shopId,
            List<String> barcodes)
        {
            String xx = FunctionHelper.JsonSerialization(barcodes);
            return
                FunctionHelper.JsonDeserialization<List<StockInOutDetailDTO>>(
                    RestCall.PostHttp(
                            URL.接口url + "/store/saveBarcoderStockHandle?inOutFlag=" + inOutFlag
                                + "&inOutType=" + inOutType
                                + "&shopId=" + shopId,
                           FunctionHelper.JsonSerialization(barcodes)
                           )
                );
        }
        public static StockInOutBatchDTO REsaveBarcoderStockHandle(
            int inOutFlag,
            String inOutType,
            String shopId,
            List<String> barcodes)
        {
            return
                FunctionHelper.JsonDeserialization<StockInOutBatchDTO>(
                    RestCall.PostHttp(
                            URL.接口url + "/store/saveBarcoderStockHandle?inOutFlag=" + inOutFlag
                                + "&inOutType=" + inOutType
                                + "&shopId=" + shopId,
                           FunctionHelper.JsonSerialization(barcodes)
                           )
                );
        }
        
    }
    public class StockInOutBatchDTO
    {
        public String inOutCode { get; set; }
        public List<StockInOutDetailDTO> stockInOutDetailDTOS { get; set; } = new List<StockInOutDetailDTO>();
        public StockInOutBatchDTO()
        {

        }
    }
    public class KingDeeResultDTO
    {
        public String Fnumber { get; set; }  //  生产批次号
        public String Fid { get; set; }  //  生产批次号
        public KingDeeResultDTO()
        {

        }

        public KingDeeResultDTO(string fnumber, string fid)
        {
            Fnumber = fnumber;
            Fid = fid;
        }
    }
    public class MaterialCompositionDTO
    {
        public String composition { get; set; }
        public String desc { get; set; }
        public DateTime createDate { get; set; }
        public MaterialCompositionDTO()
        {

        }
    }
    public class MaterialCompositionCountDTO
    {
        public String composition { get; set; }
        public String desc { get; set; }
        public String content { get; set; }
        public MaterialCompositionCountDTO()
        {

        }

        public MaterialCompositionCountDTO(string composition, string desc, string content)
        {
            this.composition = composition;
            this.desc = desc;
            this.content = content;
        }
    }
    public class FabricCompositionDTO
    {
        public String fabricComposition { get; set; }
        public List<MaterialCompositionCountDTO> materialCompositionCountDTOs { get; set; } = new List<MaterialCompositionCountDTO>();
        public FabricCompositionDTO()
        {

        }

        public FabricCompositionDTO(string fabricComposition, List<MaterialCompositionCountDTO> materialCompositionCountDTOs)
        {
            this.fabricComposition = fabricComposition;
            this.materialCompositionCountDTOs = materialCompositionCountDTOs;
        }
    }
    public class WIPBatchWIthMBomDTO
    {
        public String batchNo { get; set; }  //  生产批次号
        public DateTime batchDate { get; set; } //  生产批次开立时间
        public String batchStatus { get; set; } //  生产批状态 @See  top.toptimus.constValue.PMCLotStatus
        public Boolean urgentFlg { get; set; }  //  加急标识
        public Boolean stockOutFlg { get; set; }  //  待出库标识

        public Double batchQuantity { get; set; }   //  批次数量

        /**
         * 订单信息
         */
        public String orderId { get; set; }
        public String orderNo { get; set; } //  订单号
        public DateTime orderDate { get; set; } //  订单时间
        /**
         * 款式信息
         */
        public String styleSizeCd { get; set; } //  尺码
        public String styleNameCn { get; set; } //  款式名称
        /**
         * 面料信息
         */
        public String materialNameCn { get; set; }//面料描述名称
        public String materialCode { get; set; }  //面料号
        public String composition { get; set; }//面料成分
        /**
         * 客户信息
         */
        public String customerName { get; set; }
        public String mobile { get; set; }
        public String addressProvince { get; set; }//省
        public String addressCity { get; set; }//市
        public String addressDistrict { get; set; }//区
        public String addressDetail { get; set; }//详细地址
        public String zipCode { get; set; }//邮编
        /**
         * 客户返单信息
         */
        public String refOrderId { get; set; }  //  客户返单id
        public String refOrderNo { get; set; }  //  客户返单号
        /**
         * 金蝶BOM信息
         */
        public int fmaterialid { get; set; }
        public String fname { get; set; }   //  编码
        public String fspecification { get; set; }
        public String fdescription { get; set; }//  名称
        public Double ffixscrapqty { get; set; }//  固定损耗
        public Double ffixscrapqtyAll { get; set; }//  固定损耗合计

        public String fnumber { get; set; } //  金蝶内码
        public String productNo { get; set; }   //  坚山xml数据的制造番号
        public String oyaProductNo { get; set; }    //  制造母番号
        public WIPBatchWIthMBomDTO()
        {

        }
    }
    public class MaterialRequirementDTO
    {
        /**
         * 金蝶BOM信息
         */
        public int fmaterialid { get; set; }
        public String fname { get; set; }   //  编码
        public int batchCount { get; set; }//  产成品需求数量
        public Double ffixscrapqty { get; set; }//  固定损耗
        public Double inventory { get; set; }//  库存
        public int todoBillCount { get; set; }  //  未出库订单数量
        public Double fabricScrapQty { get; set; }  //  出库实际数
        public MaterialRequirementDTO()
        {

        }

    }
    public class MaterialRequirementQueryFacadeDTO
    {
        public ShopRightQueryFacadeDTO shopRightQueryFacadeDTO { get; set; } = new ShopRightQueryFacadeDTO();
        public List<WIPBatchWIthMBomDTO> wipBatchWIthMBomDTOS { get; set; } = new List<WIPBatchWIthMBomDTO>();//  清洗待出库订单
        public List<MaterialRequirementDTO> materialRequirementDTOS { get; set; } = new List<MaterialRequirementDTO>();
        public Dictionary<String, List<WIPBatchWIthMBomDTO>> relevantWipBatchWIthMBomDTOList { get; set; } = new Dictionary<string, List<WIPBatchWIthMBomDTO>>();  //  待清洗出库相关面料对应的订单
        public MaterialRequirementQueryFacadeDTO()
        {

        }
        public MaterialRequirementQueryFacadeDTO build(ShopRightQueryFacadeDTO shopRightQueryFacadeDTO)
        {
            this.shopRightQueryFacadeDTO = shopRightQueryFacadeDTO;
            return this;
        }
    }
    public class MaterialPurchaseDetailDTO
    {
        public String fname { get; set; }   //  物料编码
        public String fnumber { get; set; } //  金蝶物料编码
        public int fmaterialid { get; set; } //  金蝶物料主键
        public Double fqty { get; set; }    //  采购数量
        public MaterialPurchaseDetailDTO()
        {

        }

        public MaterialPurchaseDetailDTO(string fname, string fnumber, int fmaterialid, double fqty)
        {
            this.fname = fname;
            this.fnumber = fnumber;
            this.fmaterialid = fmaterialid;
            this.fqty = fqty;
        }
    }
    public class MaterialPlanDTO
    {
        public String id { get; set; }
        public String materialPlanNo { get; set; }
        public DateTime createDate { get; set; }
        public Boolean complete { get; set; }
        public String code { get; set; }
        public String name { get; set; }
        public String mnemonic { get; set; }
        public MaterialPlanDTO()
        {

        }

    }
    public class MaterialDetailDTO
    {
        public int fmaterialid { get; set; }
        public String fname { get; set; }
        public String fnumber { get; set; }
        public MaterialDetailDTO()
        {

        }
    }
    public class StockOutDetailDTO
    {
        //物料fnumber
        public String MaterialChildId { get; set; }
        //采购数量
        public Double FQty { get; set; }
        public StockOutDetailDTO(String MaterialChildId, Double FQty)
        {
            this.MaterialChildId = MaterialChildId;
            this.FQty = FQty;
        }
        public StockOutDetailDTO()
        {

        }
        public StockOutDetailDTO(BomStockOutDTO bomStockOutDTO)
        {
            this.MaterialChildId = bomStockOutDTO.fnumber;
            this.FQty = bomStockOutDTO.ffixscrapqty;
        }
    }
    public class MaterialRequirementQueryDTO
    {
        public String id { get; set; }
        public String materialPlanNo { get; set; }  //  物料需求计划编码
        public List<MaterialRequirementDTO> materialRequirementDTOS { get; set; } = new List<MaterialRequirementDTO>();   //  物料库存和固定损耗
        public List<WIPBatchWIthMBomDTO> relevantWipBatchWIthMBomDTOList { get; set; } = new List<WIPBatchWIthMBomDTO>();  //  待清洗出库相关面料对应的订单

        public String mnemonic { get; set; }   //  面料出库审核人
        public DateTime createDate { get; set; }//  结束时间
        public DateTime completeDate { get; set; }  //  结束时间

        public Boolean complete { get; set; }
        public String douyinRequestId { get; set; }  //  成衣需求计划

        public String fid { get; set; } //  金蝶物料领用出库单id
        public String fName { get; set; } //  金蝶物料领用出库单编码
        public String achievementUrl { get; set; }  //  最终成果物URL      
        public String stockOutMnemonic { get; set; }//  实际出库审核人
        public List<MaterialPurchaseTitleDTO> materialPurchaseTitleDTOS { get; set; } = new List<MaterialPurchaseTitleDTO>();  //  采购订单抬头
        public ShopRightQueryFacadeDTO shopRightQueryFacadeDTO { get; set; } = new ShopRightQueryFacadeDTO();    //  业务组织下明细一览
        public BarcodeBaseInfo barcodeBaseInfo { get; set; }
        public MaterialRequirementQueryDTO()
        {

        }
    }
    public class BarcodeBaseInfo
    {
        public String barcode { get; set; }
        public String styleNameCn { get; set; }//款式名称
        public String materialCode { get; set; }  //面料号
        public String styleSizeCd { get; set; }//尺码
        public BarcodeBaseInfo()
        {

        }

        public BarcodeBaseInfo(string barcode, string styleNameCn, string materialCode, string styleSizeCd)
        {
            this.barcode = barcode;
            this.styleNameCn = styleNameCn;
            this.materialCode = materialCode;
            this.styleSizeCd = styleSizeCd;
        }
    }
    public class MaterialPurchaseTitleDTO
    {
        public String id { get; set; }
        public String fnumber { get; set; }
        public String supplierid { get; set; }
        public String supplierName { get; set; }
        public DateTime createDate { get; set; }
        public List<MaterialPurchaseDetailDTO> materialPurchaseDetailDTOs { get; set; } = new List<MaterialPurchaseDetailDTO>();
        public MaterialPurchaseTitleDTO()
        {

        }
        public MaterialPurchaseTitleDTO(String fnumber, String supplierName, String id)
        {
            this.fnumber = fnumber;
            this.supplierName = supplierName;
            this.id = id;
        }

    }
    public class MaterialPlanConfirmIndexDTO
    {
        public String id { get; set; }
        public String materialPlanNo { get; set; }  //  物料需求计划编码
        public DateTime createDate { get; set; }
        public Boolean complete { get; set; }

        /*
         * 裁剪和断料信息
         */
        public Boolean tailorComplete { get; set; } //  裁剪完成
        public String tailorMnemonic { get; set; }   //  裁剪完成人
        public DateTime tailorCompleteDate { get; set; }    //  裁剪完成时间

        /**
         * 成果物信息
         */
        public String fid { get; set; } //  金蝶物料领用出库单id
        public String fName { get; set; } //  金蝶物料领用出库单编码
        public String achievementUrl { get; set; }  //  最终成果物URL

        public List<MaterialRequirementDTO> materialRequirementDTOS { get; set; } = new List<MaterialRequirementDTO>();   //  物料库存和固定损耗
        public List<WIPBatchWIthMBomDTO> wipBatchWIthMBomDTOS { get; set; } = new List<WIPBatchWIthMBomDTO>(); //  清洗待出库订单
        public MaterialPlanConfirmIndexDTO()
        {

        }
    }
    public class PreManufactureCADTodoDTO
    {
        public String id { get; set; }  //  生产计划主键
        public String materialPlanNo { get; set; }  //  物料需求计划编码
        public String mnemonic { get; set; }   //  生产计划制定人
        public DateTime createDate { get; set; }    //  编制生产计划时间
        public String fid { get; set; } //  金蝶物料领用出库单id
        public String fName { get; set; } //  金蝶物料领用出库单编码

        /*
         *  审版工序信息
         */
        public String projectInstanceId { get; set; }   //  工序id
        public String batchNo { get; set; } //  生产批次
        public String orderId { get; set; } //  订单id
                                            //  WBS模板信息
        public String wbsTemplateId { get; set; }   //  WBS模板id
        public String wbsItemId { get; set; }  //  WBS项目id
        public String parentId { get; set; }    //  父id
        public String activityDescription { get; set; } //  工作描述
        public String code { get; set; }  //  WBS编码顺序
        public int index { get; set; }   //  顺序
                                         //  WBS实例信息
        public DateTime actualFinishDate { get; set; }  //  实际完成时间
        public DateTime startTimePlanned { get; set; }  //  计划开始时间（工单时间）
        public double duration { get; set; }    //  工期
        public double costPlusFixedFee { get; set; }   //  成本加固定费用
        public String responsorId { get; set; }  //  任务负责人ID
        public String responsor { get; set; }    //  任务负责人
        public String assigneeId { get; set; }  //  执行人id
        public String assignee { get; set; }  //  执行人
        public String content { get; set; } //  内容
        public Boolean done { get; set; }   //  完成标识
        public PreManufactureCADTodoDTO()
        {

        }
    }
    class MaterialVerifyDTO
    {
        public List<String> Numbers { get; set; }
        public String Ids { get; set; }
        public String InterationFlags { get; set; }

        public bool NetworkCtrl { get; set; }
        public bool IsVerifyProcInst { get; set; }
        public bool IgnoreInterationFlag { get; set; }


        public MaterialVerifyDTO(String FNumber, String id)
        {
            this.Numbers = new List<string>();
            this.Numbers.Add(FNumber);
            this.Ids = id;
        }
    }

    class MaterialSubmitDTO
    {
        public List<String> Numbers { get; set; }
        public String Ids { get; set; }

        public int SelectedPostId { get; set; }

        public bool NetworkCtrl { get; set; }
        public bool IgnoreInterationFlag { get; set; }


        public MaterialSubmitDTO(String FNumber, String id)
        {
            this.Numbers = new List<string>();
            this.Numbers.Add(FNumber);
            this.Ids = id;
        }
    }
    public class ShopRightQueryFacadeDTO
    {
        public String orgId { get; set; }
        public String orgName { get; set; }
        public Boolean manufactureOrg { get; set; }    //  是否生产组织，不是生产组织就是销售组织
        public String shopId { get; set; }
        public String shopName { get; set; }    //  店名
        public String shopCd { get; set; }  //  受托加工号
        public String businessType { get; set; }    //  业务类型，定制、样衣、套号
        public DateTime createDate { get; set; }
        public ShopRightQueryFacadeDTO()
        {

        }
    }
    public class ShopInfoDTO
    {
        public String shopId { get; set; }
        public String shopName { get; set; }    //  店名
        public String shopCd { get; set; }  //  受托加工号
        public ShopInfoDTO()
        {

        }

        public ShopInfoDTO(string shopId, string shopName, string shopCd)
        {
            this.shopId = shopId;
            this.shopName = shopName;
            this.shopCd = shopCd;
        }
        public ShopInfoDTO(ShopRightQueryFacadeDTO shopRightQueryFacadeDTO)
        {
            this.shopId = shopRightQueryFacadeDTO.shopId;
            this.shopName = shopRightQueryFacadeDTO.shopName;
            this.shopCd = shopRightQueryFacadeDTO.shopCd;
        }
    }
    public class OrgInfoDTO
    {
        public String orgId { get; set; }
        public String orgName { get; set; } //  业务组织名称
        public String orgNameEn { get; set; }   //  业务组织名称英文
        public Boolean manufactureOrg { get; set; }    //  是否生产组织，不是生产组织就是销售组织
        public DateTime createDate { get; set; }
        public List<ShopRightQueryFacadeDTO> shopRightQueryFacadeDTOList { get; set; } = new List<ShopRightQueryFacadeDTO>();
        public OrgInfoDTO()
        {

        }
    }
    public class BlnResult
    {
        public bool if款式 { get; set; } = false;
        public bool if条码存在 { get; set; } = false;

        public BlnResult()
        {

        }

        public BlnResult(bool if款式, bool if条码存在)
        {
            this.if款式 = if款式;
            this.if条码存在 = if条码存在;
        }
    }
    public class KingDeeStockInventoryDTO
    {
        public String fname { get; set; }   //  编码
        public String fspecification { get; set; }  //  名称
        public Double quantity { get; set; }

        public String vendorName { get; set; }    //  供货商
        public String composition { get; set; }    //  成分
        public String density { get; set; }    //  纱织密度
        public String weight { get; set; }    //  克重
        public String width { get; set; }    //  幅宽
        public String thick { get; set; }    //  厚度
        public String continuity { get; set; }    //  延续性
        public String color { get; set; }    //  颜色
        public String season { get; set; }    //  季节
        public KingDeeStockInventoryDTO()
        {

        }
    }
    public class KashiyamaWipDTO
    {
        public String addressCity { get; set; }
        public String addressDetail { get; set; }
        public String addressDistrict { get; set; }
        public String addressProvince { get; set; }
        public DateTime batchDate { get; set; }
        public String batchNo { get; set; }
        public Double batchQuantity { get; set; }
        public String batchStatus { get; set; }
        public String brand { get; set; }
        public String companyCd { get; set; }
        public String composition { get; set; }
        public String custKana { get; set; }
        public String customerName { get; set; }
        public DateTime deliDateArrival { get; set; }
        public String id { get; set; }
        public DateTime inputDt { get; set; }
        public String item { get; set; }
        public String itemNumber { get; set; }
        public String itemType { get; set; }
        public DateTime kashiyamaCreateDate { get; set; }
        public DateTime kashiyamaOrderDate { get; set; }
        public String katabanPtnCd { get; set; }
        public String kijiBrand { get; set; }
        public String kijiColor { get; set; }
        public String kijiNo { get; set; }
        public DateTime ojyoShukaDt { get; set; }
        public String materialCode { get; set; }
        public String materialNameCn { get; set; }
        public String mobile { get; set; }
        public DateTime orderDate { get; set; }
        public String orderId { get; set; }
        public String orderNo { get; set; }
        public String oyaProductNo { get; set; }
        public String period { get; set; }
        public String productNo { get; set; }
        public String productYear { get; set; }
        public String seisanSosikiCd { get; set; }
        public Boolean tockOutFlg { get; set; }
        public String styleNameCn { get; set; }
        public String styleSizeCd { get; set; }
        public String szCd { get; set; }
        public String txPeriod { get; set; }
        public Boolean urgentFlg { get; set; }
        public String zipCode { get; set; }
        public KashiyamaWipDTO()
        {

        }
        
    }
    public class MrpStockOutDetailDTO
    {
        public String barcode { get; set; } //成衣条码
        public String styleNameCn { get; set; } //款式名称
        public String materialCode { get; set; } //面料号
        public String styleSizeCd { get; set; } //尺码
        public String orderId { get; set; }
        public String batchNo { get; set; }
        public String orderNo { get; set; }

        public DateTime createDate { get; set; }
        public String materialRequirementId { get; set; }   //  外键  @see top.toptimus.erpCloudService.jpa.dao.erpCloud.mrpInfo.MaterialRequirementReportDao.id
        public Double price { get; set; }
        public Boolean wipBatch { get; set; }

        /*
         *  出入库信息
         */
        public int lastedInOutFlag { get; set; }   //  最新出入库标识
        public String lastedInOutType { get; set; }    //  最新出入库类型
        public DateTime lastedSalesTime { get; set; } //  最新出入库时间

        public int firstInOutFlag { get; set; }   //  第一次出入库标识
        public String firstInOutType { get; set; }    //  第一次出入库类型
        public DateTime firstSalesTime { get; set; } //  第一次出入库时间

        /*
         *  批次信息
         */
        public DateTime batchDate { get; set; } //  生产批次开立时间
        public Boolean urgentFlg { get; set; }  //  加急标识
        public Double batchQuantity { get; set; }   //  批次数量
        public String customerName { get; set; }
        public String mobile { get; set; }
        public String addressProvince { get; set; }//省
        public String addressCity { get; set; }//市
        public String addressDistrict { get; set; }//区
        public String addressDetail { get; set; }//详细地址

        public String activityDescription { get; set; } //  工作描述
        public DateTime actualFinishDate { get; set; }  //  实际完成时间
        public DateTime startTimePlanned { get; set; }  //  计划开始时间（工单时间）
        public String detailType { get; set; }  //  存货明细类型

        public MrpStockOutDetailDTO()
        {

        }
    }
    public class GarmentStockStatusDTO
    {
        public String styleCode { get; set; } //款式名称
        public String materialCode { get; set; } //面料号
        public String styleSizeCd { get; set; } //尺码
        public int stockOutQuantity { get; set; }//出库数量
        public int stockInQuantity { get; set; }//入库数量
        public int wipQuantity { get; set; } //在制品数量
        public int stockQuantity { get; set; } //在库数量
        public int garmentOrderQuatity{ get; set; }   //  成衣下单数量
        public int douyinprepareQuantity { get; set; }    //  备货数量
        public int douyindeliveryQuantity { get; set; }    //  已发货数量
        public int douyincloseQuantity { get; set; }   //  已关闭数量
        public int douyincompleteQuantity { get; set; }   //  已完成数量
        public int douyinOrderQuantity { get; set; }   //  抖音订单总数量
        public int douyinRequestQuantity { get; set; }   //  补货订单差值
        public int garmentRequestQuantity { get; set; }   //  在制品差值

        public GarmentStockStatusDTO()
        {

        }
        
    }
    public class GarmentStockDTO
    {
        public String barcode { get; set; }
        public String batchNo { get; set; }
        public String customerName { get; set; }
        public String fabricCode { get; set; }
        public String fabricComposition { get; set; }
        public String fabricId { get; set; }
        public String fabricName { get; set; }
        public int inOutFlag { get; set; }
        public String inOutType { get; set; }
        public String inventory { get; set; }
        public String mobile { get; set; }
        public double price { get; set; }
        public String refStyleId { get; set; }
        public DateTime salesTime { get; set; }
        public String storeId { get; set; }
        public String storeName { get; set; }
        public String styleNameCn { get; set; }
        public String styleSizeCd { get; set; }
        public GarmentStockDTO()
        {

        }
    }
    public class MrpInventoryCalculateResultDTO
    {
        public List<DouyinOrderQuantityDTO> douyinOrderQuantityDTOS { get; set; } = new List<DouyinOrderQuantityDTO>();  //  抖音订单数量
        public List<MrpResultDTO> mrpResultDTOS { get; set; } = new List<MrpResultDTO>();  //  订单和工序信息
        public List<MrpInventoryDetailDTO> mrpInventoryDetailDTOS { get; set; } = new List<MrpInventoryDetailDTO>(); //进销存明细
        public List<GarmentStockStatusDTO> garmentStockStatusDTOs { get; set; } = new List<GarmentStockStatusDTO>(); //库存
        public MrpInventoryCalculateResultDTO()
        {

        }

    }
    public class DouyinOrderQuantityDTO
    {
        public String styleSizeCd { get; set; } //  尺码
        public String styleCode { get; set; }
        public String materialCode { get; set; }
        public int quantity { get; set; }
        public DouyinOrderQuantityDTO()
        {

        }
    }
    public class MrpInventoryDetailDTO
    {
        public String activityDescription { get; set; }
        public DateTime actualFinishDate { get; set; }
        public String addressCity { get; set; }
        public String addressDetail { get; set; }
        public String addressDistrict { get; set; }
        public String addressProvince { get; set; }
        public String barcode { get; set; }
        public String batchDate { get; set; }
        public String batchNo { get; set; }
        public Double batchQuantity { get; set; }
        public DateTime createDate { get; set; }
        public String customerName { get; set; }
        //public String detailType { get; set; }
        public String firstInOutFlag { get; set; }
        public String firstInOutType { get; set; }
        public DateTime firstSalesTime { get; set; }
        public String lastedInOutFlag { get; set; }
        public String lastedInOutType { get; set; }
        public DateTime lastedSalesTime { get; set; }
        public String materialCode { get; set; }
        public String materialRequirementId { get; set; }
        public String mobile { get; set; }
        public String orderId { get; set; }
        public String orderNo { get; set; }
        public Double price { get; set; }
        public DateTime startTimePlanned { get; set; }
        public String styleNameCn { get; set; }
        public String styleSizeCd { get; set; }
        public Boolean urgentFlg { get; set; }
        public Boolean wipBatch { get; set; }
        public int stockOutQuantity { get; set; }  //  出库数量
        public int stockInQuantity { get; set; }  //  入库数量
        public int wipQuantity { get; set; }  //  在制品数量

        public MrpInventoryDetailDTO()
        {

        }

    }
    public class MrpResultDTO
    {
        public String batchNo { get; set; }  //  生产批次号
        public String materialRequirementId { get; set; }   //  外键  @see top.toptimus.erpCloudService.jpa.dao.erpCloud.mrpInfo.MaterialRequirementReportDao.id
        public DateTime batchDate { get; set; } //  生产批次开立时间
        public Boolean urgentFlg { get; set; }  //  加急标识
        public Double batchQuantity { get; set; }   //  批次数量
        public String orderId { get; set; }
        public String orderNo { get; set; }
        public String styleSizeCd { get; set; } //  尺码
        public String styleNameCn { get; set; } //  款式名称
        public String materialCode { get; set; }  //面料号
        public String customerName { get; set; }
        public String mobile { get; set; }
        public String addressProvince { get; set; }//省
        public String addressCity { get; set; }//市
        public String addressDistrict { get; set; }//区
        public String addressDetail { get; set; }//详细地址

        public String activityDescription { get; set; } //  工作描述
        public DateTime actualFinishDate { get; set; }  //  实际完成时间
        public DateTime startTimePlanned { get; set; }  //  计划开始时间（工单时间）
        public MrpResultDTO()
        {

        }
    }
}
